Ext.workRemindPanel = Ext.extend(Ext.TabPanel,{
	initialized:false,
	listeners : {
		   'tabchange' : function(){
			var panel = this.getActiveTab();
//		    Ext.Msg.alert(panel.getId());
			if(panel.getId()== "alertEventReceived"){
				Ext.getCmp("inquryAlertEventRecCombobox_id").setValue();
				var store = panel.findById("alertEventReceivedGrid_id").store;
				store.on('beforeload',function(){
					store.baseParams = {
							pageMessage2 : getLoginJobNumber()
							
					}
				});
				store.load({
					params:{
						pageMessage2 : getLoginJobNumber(),
						type : "all",
						start : 0,
						limit : 20
					}
				})
				
				
			}else if(panel.getId()== "alertEventPublished"){
				Ext.getCmp("inquryAlertEventPubCombobox_id").setValue();
				var store = panel.findById("alertEventPublishedGrid_id").store;
				store.on('beforeload',function(){
					store.baseParams = {
							pageMessage2 : getLoginJobNumber()
							
					}
				});
				store.load({
					params:{
						pageMessage2 : getLoginJobNumber(),
						type : "all",
						start : 0,
						limit : 20
					}
				})
			}
		}},
    initComponent:function(){
//	    Ext.QuickTips.init();//显示消息
//        Ext.form.Field.prototype.msgTarget='side';//再设置提示样式。
//	    this.renderTo = document.body,
	    this.activeTab = 0;
	    this.items = [{
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	title:'接收提醒事件',
	    	id:'alertEventReceived',
	    	layout:'border', 
//	    	listeners : {
//	    		'beforetabchange' : function(){Ext.Msg.alert("x")}
//	    	},
	    	items:[new Ext.alertEventReceivedGrid({
	    		id : 'alertEventReceivedGrid_id',
	    		region:'center'
	    	})]
	    },{
	    	labelAlign: 'right',
	    	labelWidth: 100,
	    	title:'发布提醒事件',
	    	id:'alertEventPublished',
	    	layout:'border', 
	    	items:[new Ext.alertEventPublishedGrid({
	    		id : 'alertEventPublishedGrid_id',
	    		region:'center'

	    	})]
	    }]
	    Ext.workRemindPanel.superclass.initComponent.call(this);
	}
	
})